<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function f1() {
            function f2() {
                console.log(num)
            }

        }

        var num = 456;

        function f3() {

            function f4() {
            }
        }
    </script>
</head>
<body>

</body>
</html>